<?php
$yunbbs_users = $pdo->query("select count(*) from yunbbs_users");
foreach ($yunbbs_users as $key => $gesu) {
}
$yunbbs_categories = $pdo->query("select count(*) from yunbbs_categories");
foreach ($yunbbs_categories as $key => $fenlei) {
}
$yunbbs_articles = $pdo->query("select count(*) from yunbbs_articles");
foreach ($yunbbs_articles as $key => $tiezi) {
}
?>
<style>
    .message {
        float: left;
        margin-bottom: 10px; 
    }
    .message3 {
        margin: 5px 5px 10px;
        width: 70px;
        border: 1px solid #bbb7bb;
    }
</style>
<div id="body_left">
    <div id="body_left_title" style="height: 70px;width: 100%; background-color: white; margin-top: 15px;">
        <div style="height: 50px; width: 100%; background-color: #efeded;">
            <p class="title" style="float:left;">&nbsp mybbs >> 最近更新·PHP905</p>
            <p style="border:1px solid #c6c6c6; float: right; margin-right:15px;"><a href="posting.php">+发新帖</a></p>
        </div>
    </div>
</div>
<div id="body_right">
    <div id="fenlei">
        <div style="margin-top:10px; background-color: white; height: 120px;">
            <p class="title">&nbsp管理员面板 (MyBBS官方支持)</p>
            <div class="message"><a href="fenleiguanli.php">分类管理</a></div>
            <div class="message"><a href="fenleiguanli.php">网站设置</a></div>
            <div class="message"><a href="fenleiguanli.php">用户管理</a></div>
            <div class="message"><a href="fenleiguanli.php">链接管理</a></div>
        </div>
        <div style="margin-top:10px; background-color: white; display: flex; flex-direction: column;">
            <div class="title">&nbsp最近添加的分类</div>
            <div style="display: flex; flex-wrap: wrap;">
                <?php foreach ($yunbbs_categories as $key => $value) { ?>
                    <div class="message3"><a href="#"><?php echo $value['name'] ?></a></div>
                <?php }
                ?>
            </div>
        </div>
        <div style="margin-top:10px; background-color: white; height: 120px;;">
            <p class="title">&nbsp链接</p>
            <div class="message2"><a href="#">MyBBS</a></div>
        </div>
        <div style="margin-top:10px; background-color: white; height: 200px;">
            <p class="title">&nbsp站点运行信息 (<?php $time = '1480409059'; echo wordTime($time); ?>)</p>
            <p class="message1">会员:<?php echo $gesu['count(*)']; ?></p>
            <p class="message1">分类:<?php echo $fenlei['count(*)']; ?></p>
            <p class="message1">帖子:<?php echo $tiezi['count(*)']; ?></p>
            <p class="message1">回复:0</p>
        </div>
    </div>
    <div style="height: 20px"></div>
</div>


